package com.atguigu.gmall.feign.order;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.order.entity.OrderInfo;
import com.atguigu.gmall.order.vo.OrderConfirmRespVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author tangsy
 * @Description TODO
 * @date 2022/12/21 20:23
 * @Version 1.0
 */
@RequestMapping("/api/inner/rpc/order")
@FeignClient("service-order")
public interface OrderFeignClient {

    @GetMapping("/confirmdata")
    Result<OrderConfirmRespVo> orderConfirmData();

    @GetMapping("info/{id}")
    Result<OrderInfo> getOrderInfoById(@PathVariable("id") Long id);

    @PostMapping("/seckill/order")
    Result<Long> saveSeckillOrder(@RequestBody OrderInfo info);

}